
package com.ebupt.migu.music.bannertwo.enums;

import lombok.Getter;

/**
 * 条件参数枚举
 */
@Getter
public enum ConditionEnum {

    /**
     * 操作系统
     */
    Android(1, 1, "Android_migu", "Android_migu"),
    /**
     * 操作系统版本
     */
    IOS(1, 2, "Ios_migu", "Ios_migu");

//	/**
//	 * version(版本号)
//	 */
//	VERSION(2,1,"version","版本号"),
//	/**
//	 * 运营商
//	 */
//	MGM_NETWORK_OPERATORS(3,1,"mgm-network-operators","运营商类型"),
//
//	/**
//	 * 省份
//	 */
//	adCode(4,1,"adCode","省份"),
//	/**
//	 * 城市
//	 */
//	cityCode(4,2,"cityCode","城市"),
//
//	/**
//	 * 渠道标签
//	 */
//	CHANNEL1(5,1,"channel","渠道"),
//	/**
//	 * 登录
//	 */
//	LOGIN(6,1,"login","登录");

    final int propertyCode;
    final int conditionKey;
    final String value;
    final String name;

    ConditionEnum(int propertyCode, int conditionKey, String value, String name) {
        this.propertyCode = propertyCode;
        this.conditionKey = conditionKey;
        this.value = value;
        this.name = name;
    }


    public static ConditionEnum get(int propertyCode, int conditionKey) {
        for (ConditionEnum v : values()) {
            if (v.getPropertyCode() == propertyCode && v.getConditionKey() == conditionKey) {
                return v;
            }
        }
        return null;
    }


}
